public class StringDemo7 {
    public static void main(String[] args) {
        String s1="adfdfsdf";
        String s=reverse(s1);
        System.out.println(s);
    }

    public static String reverse(String s){
        String s1=new String();
        for(int i=s.length()-1;i>-1;i--){
            s1+=s.charAt(i);
        }
        return s1;
    }
}
